module.exports = (app) => {
  const { TEXT, DATE, INTEGER, BOOLEAN, STRING } = app.Sequelize
  const PhotoList = app.model.define('photo_list', {
    id: {
      type: INTEGER(20).UNSIGNED,
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      comment: '照片列表id'
    },
    photo_url: {
      type: TEXT,
      allowNull: false,
      comment: '照片地址'
    },
    tag: {
      type: STRING(20),
      allowNull: false,
      comment: '留言墙标签'
    },
    status: {
      type: BOOLEAN,
      values: [true, false],
      defaultValue: true,
      comment: '照片状态'
    },
    created_at: DATE,
    updated_at: DATE
  })
  return PhotoList
}
